#include <iostream>

using namespace std;

/**
 * https://www.luogu.com.cn/problem/P1046
 */
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int h1,h2,h3,h4,h5,h6,h7,h8,h9,h10;
    cin >> h1 >> h2 >> h3 >> h4 >> h5 >> h6 >> h7 >> h8 >> h9 >> h10;

    int taotao;
    cin >> taotao;

    taotao += 30;

    int apples = 0;
    if(taotao >= h1) apples++;
    if(taotao >= h2) apples++;
    if(taotao >= h3) apples++;
    if(taotao >= h4) apples++;
    if(taotao >= h5) apples++;
    if(taotao >= h6) apples++;
    if(taotao >= h7) apples++;
    if(taotao >= h8) apples++;
    if(taotao >= h9) apples++;
    if(taotao >= h10) apples++;

    cout << apples;

    return 0;
}